home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 37 / 64er_Magazin_Sonderheft_37_19xx_Markt__Technik_de_Disk_2_of_2_Side_B.d64 / listing 7.sprite (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  428b  |  25 lines

  1. 310 x=0:y=0
  2. 320 p2=peek(56320)
  3. 321 if (p2 and 1)=0 then y=-4
  4. 322 if (p2 and 2)=0 then y=+4
  5. 323 if (p2 and 4)=0 then x=-4:xb=2
  6. 324 if (p2 and 8)=0 then x=+4:xb=0
  7. 330 if x=0 and y=0 then 320
  8. 340 poke 2040,32+xb
  9. 345 gosub 500
  10. 350 poke 2040,33+xb
  11. 355 gosub 500
  12. 400 goto 310
  13. 500 bw=bw+x
  14. 501 cw=cw+y
  15. 505 if bw>344 then bw=0
  16. 506 if bw<0 then bw=bw+344
  17. 507 if cw>242 then cw=0
  18. 508 if cw<0 then cw=cw+242
  19. 510 bh=int(bw/256):bl=bw-bh*256
  20. 520 poke v+0,bl
  21. 521 poke v+1,cw
  22. 530 poke v+16,bh
  23. 560 for w=0 to 50:next
  24. 600 return
  25.